package com.ruoyi.door.domain;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;

import com.ruoyi.door.domain.proxy.DoorOrderProxy;
import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.experimental.FieldNameConstants;

import java.io.Serializable;
import java.util.List;

import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.easy.query.core.annotation.Column;
import com.easy.query.core.annotation.EntityProxy;
import com.easy.query.core.annotation.Table;
import com.easy.query.core.proxy.ProxyEntityAvailable;

/**
 * 订单信息对象 door_order_info
 *
 * @author ruoyi
 * @date 2025-06-22
 */
@Data
@Table("door_order")
@ApiModel(value = "订单信息对象", description = "订单信息信息")
@EntityProxy
@AllArgsConstructor
@NoArgsConstructor
@FieldNameConstants
public class DoorOrder implements ProxyEntityAvailable<DoorOrder, DoorOrderProxy>, Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @Column(primaryKey = true, generatedKey = true)
    @ApiModelProperty("主键")
    private Long id;

    /**
     * 订单类型
     */
    @Excel(name = "订单类型")
    @ApiModelProperty("订单类型;1=运维费;2=买卡;3=人脸")
    private Long type;


    @ApiModelProperty("创建时间")
    private Date createTime;
    private String openid;


    private Long userId;


    /**
     * 总价
     */
    @Excel(name = "总价")
    @ApiModelProperty("总价")
    private BigDecimal totalPrice;


    /**
     * 三方单号
     */
    @Excel(name = "三方单号")
    @ApiModelProperty("三方单号")
    private String tradeNo;

    /**
     * 商户订单
     */
    @Excel(name = "商户订单")
    @ApiModelProperty("商户订单")
    private String orderNo;

    /**
     * 订单状态 0=代付款;1=已付款;2=退款中;3=已退款
     */
    @Excel(name = "订单状态")
    @ApiModelProperty("订单状态")
    private Long orderStatus;

    /**
     * 支付时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("支付时间")
    private Date payTime;


    @ApiModelProperty("付款IP")
    private String payIp;


    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "退款创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("退款创建时间")
    private Date refundCreateTime;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "完成退款时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("完成退款时间")
    private Date refundTime;


    @ApiModelProperty("退款IP")
    private String refundIp;
    private String refundNo;
    /**
     * 签约协议号（确认绑卡返回）
     */
    @ApiModelProperty("签约协议号")
    private String protocolNo;

    @ApiModelProperty("持卡人姓名")
    private String chName;

    @ApiModelProperty("持卡人身份证号")
    private String chIdNo;

    @ApiModelProperty("持卡人银行卡号")
    private String chCardNo;

    @ApiModelProperty("持卡人手机")
    private String chMobile;

    @ApiModelProperty("付款备注;银行卡缴费;自动续费;现金缴费")
    private String remark;

    @ApiModelProperty("支付渠道;1=微信;2=银行卡")
    private String payChannel;
    private String refundResp;

    @Column(exist = false)
    private List<DoorOrderDetail>details=new ArrayList<>();
}
